package com.qf.blog.service.impl;

import com.qf.blog.core.dao.IBaseDao;
import com.qf.blog.core.service.BaseServiceImpl;
import com.qf.blog.dao.ISystemUserDao;

import com.qf.blog.entity.SystemUserEntity;
import com.qf.blog.mybatis.MyBatisUtils;
import com.qf.blog.mybatis.SqlSessionThreadLocal;
import com.qf.blog.service.ISystemUserService;
import org.apache.ibatis.session.SqlSession;

public class SystemUserServiceImpl extends BaseServiceImpl<SystemUserEntity> implements ISystemUserService {

//    private ISystemUserDao systemUserDao = new SystemUserDaoDaoImpl();

    @Override
    protected IBaseDao<SystemUserEntity> getBaseDao() {
        // 从ThreadLocal中获取SqlSession对象，创建Mapper
        SqlSession sqlSession = SqlSessionThreadLocal.get();
        return sqlSession.getMapper(ISystemUserDao.class);
    }
}
